public class Test{
	public static void main(String args[]){
		CPU cpu=new CPU();//生成cpu
		cpu.setSpeed(2200);
		System.out.println(cpu.toString());//测试覆盖toString
		CPU cpu2=new CPU(2000);//生成cpu2
		System.out.println(cpu.equals(cpu2));//测试覆盖equals
		HardDisk disk=new HardDisk();//生成disk
		disk.setAmount(200);
		System.out.println(disk.toString());//测试覆盖toString
		HardDisk disk2=new HardDisk(250);//生成disk2
		System.out.println(disk.equals(disk2));//测试覆盖equals
		PC pc=new PC();
		pc.setCPU(cpu);
		pc.setHardDisk(disk);
		pc.show();
		System.out.println(pc.toString());//测试覆盖toString
		PC pc2=new PC(cpu2,disk2);//生成pc2
		System.out.println(pc.equals(pc2));//测试覆盖equals
	}
}
